package com.proxy;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Proxy;

public class Test {
	
	
	public static void main(String[] args) {
	
	 	Person person = new Person();
	 	
	 	ProxyPerson person2 = new ProxyPerson(person);
	 	
	 
	 	Play proxyObj = (Play) Proxy.newProxyInstance(ProxyPerson.class.getClassLoader(), person.getClass().getInterfaces(), person2);
	 	
	 	proxyObj.playfootBall();
	
	}

}
